<?php
//-------------------------------------------------------------------------------------------------------
    require_once('../../config.inc.php');

    require_once($config['app_dir'] . '/classes/StockMailers.class.php');
    //---------------------------------------------------------------------------------------------------
    set_time_limit(0);
    $session = false;

    if( 'cli'==php_sapi_name() ) { //console access
        $session = intval($argv[1]);
    } else {
        header('Content-Type: text/html; charset=utf-8');
        $user = strval($_GET['user']);
        $password = strval($_GET['password']);
        if( $config['manual']['user']!=$user || md5($config['manual']['password'])!=md5($password) ) die('user not set');
        $session = $_GET['session'];
    }

    $ResendMailer = new objResendMailer($session);

    $ResendMailer->max_tries = 5;
    $ResendMailer->sleep_time = 10;

    $ResendMailer->Send();
//-------------------------------------------------------------------------------------------------------
?>
